//导入request.js请求工具
import request from '@/utils/request.js'

export const getRequiredGoodsService = (page, pageSize) => {
    return request({
        url: '/requiredGoods/getRequiredGoods',
        method: 'get',
        params: {
            page,
            pageSize
        }
    })
}

export const updateHeatingValueService = (id) => {
    return request({
        url: `/requiredGoods/${id}`,
        method: 'patch'
    })
}

export const getHeatingValueService = (id) => {
    return request({
        url: `/requiredGoods/getHeatingValue/${id}`,
        method: 'get'
    })
}

export const getMyPushRequiredGoodsService = (page, pageSize) => {
    return request({
        url: '/requiredGoods/getMyPushRequiredGoods',
        method: 'get',
        params: {
            page,
            pageSize
        }
    })
}

export const deletedRequiredGoodsService = (ids) => {
    return request({
        url: `/requiredGoods/${ids}`,
        method: 'delete'
    })
}

export const pushRequiredGoodsService = (data) => {
    return request.put('/requiredGoods', data)
}